﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Data;
using Timesheet.Service;
using Timesheet.Domain;
using DevExpress.Web;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;

namespace Timesheet.WebForm.Setting
{
    public partial class Discipline : System.Web.UI.Page
    {
        public IDisciplinesService _DisciplineService { get; set; } 
        protected void Page_Load(object sender,EventArgs e)
        {
            if(!IsPostBack)
            {
                User user = Session["User"] as User;
                if (user == null)
                    Response.Redirect("~/Account/Login.aspx");
               
            }
        }

        protected void dsDisciplines_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
        {
            e.ObjectInstance = _DisciplineService; 
        }
      

    }
}